/**
 * Yolema.com Inc.
 * Copyright (c) 2011-2012 All Rights Reserved.
 */
package com.tuscany.ext.facade.result;

import java.io.Serializable;
import java.util.List;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import com.tuscany.ext.facade.ext.HotelExt;

/**
 * tbss系统返回结果基础类
 * 
 * @author liyd
 * @version $Id: TuscanyResult.java, v 0.1 2012-5-16 下午2:19:34 liyd Exp $
 */
public class TuscanyResult implements Serializable {

	/** serialVersionUID */
	private static final long serialVersionUID = -5705823626887196334L;

	/** 处理结果标志 */
	private boolean success = false;

	/** 结果码 */
	private String resultCode = "UNKNOWN_EXCEPTION";

	/** 结果信息 */
	private String resultMsg = "发生未知异常";

	private List<HotelExt> hotelList;

	public List<HotelExt> getHotelList() {
		return hotelList;
	}

	public void setHotelList(List<HotelExt> hotelList) {
		this.hotelList = hotelList;
	}

	/**
	 * 默认构造函数
	 */
	public TuscanyResult() {
		super();
	}

	/**
	 * 构造函数
	 * 
	 * @param success
	 *            是否成功标识符
	 */
	public TuscanyResult(boolean success) {
		super();
		this.success = success;
	}

	/**
	 * 构造函数
	 * 
	 * @param success
	 *            是否成功标识符
	 * @param resultMsg
	 *            处理结果信息
	 */
	public TuscanyResult(boolean success, String resultMsg) {
		super();
		this.success = success;
		this.resultMsg = resultMsg;
	}

	/**
	 * 重写toString方法
	 * 
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this,
				ToStringStyle.SHORT_PREFIX_STYLE);
	}

	/**
	 * Getter method for property <tt>success</tt>.
	 * 
	 * @return property value of success
	 */
	public boolean isSuccess() {
		return success;
	}

	/**
	 * Setter method for property <tt>success</tt>.
	 * 
	 * @param success
	 *            value to be assigned to property success
	 */
	public void setSuccess(boolean success) {
		this.success = success;
	}

	/**
	 * Getter method for property <tt>resultCode</tt>.
	 * 
	 * @return property value of resultCode
	 */
	public String getResultCode() {
		return resultCode;
	}

	/**
	 * Setter method for property <tt>resultCode</tt>.
	 * 
	 * @param resultCode
	 *            value to be assigned to property resultCode
	 */
	public void setResultCode(String resultCode) {
		this.resultCode = resultCode;
	}

	/**
	 * Getter method for property <tt>resultMsg</tt>.
	 * 
	 * @return property value of resultMsg
	 */
	public String getResultMsg() {
		return resultMsg;
	}

	/**
	 * Setter method for property <tt>resultMsg</tt>.
	 * 
	 * @param resultMsg
	 *            value to be assigned to property resultMsg
	 */
	public void setResultMsg(String resultMsg) {
		this.resultMsg = resultMsg;
	}

}
